package com.git.bds.mr.patient.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用户个人信息表
 * </p>
 *
 * @author 成大事
 * @since 2022-09-23 18:08:01
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("patient_info")
@ApiModel(value = "PatientInfo对象", description = "用户个人信息表")
public class PatientInfo extends Model<PatientInfo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("姓名")
    @TableField("real_name")
    private String realName;

    @ApiModelProperty("0：M；1：W")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty("手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("年龄")
    @TableField("age")
    private Integer age;

    @ApiModelProperty("身份证号")
    @TableField("id_card")
    private String idCard;

    @ApiModelProperty("身份证前面照片")
    @TableField("img_front")
    private String imgFront;

    @ApiModelProperty("身份证后面照片")
    @TableField("img_back")
    private String imgBack;


    public static final String ID = "id";

    public static final String REAL_NAME = "real_name";

    public static final String SEX = "sex";

    public static final String PHONE = "phone";

    public static final String AGE = "age";

    public static final String ID_CARD = "id_card";

    public static final String IMG_FRONT = "img_front";

    public static final String IMG_BACK = "img_back";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
